#pragma once
#include "Hash.h"
namespace myunset
{
	template<class K>
	class myset
	{
	public:
		struct set;
		typedef Hash::HashNode<K> node;
		typedef typename Hash::Iterator<K, K, set, K&, K*, Hash::HashFunc<K>> iterator;
		struct set
		{
			const K& operator()(const K& x)
			{
				return x;
			}
		};
		bool insert(const K& x)
		{
			return _Table.insert(x);
		}
		node* find(const K& x)
		{
			return _Table.find(x);
		}
		iterator begin()
		{
			return _Table.begin();
		}
		iterator end()
		{
			return _Table.end();
		}
	private:
		Hash::HashTable<K,K,set,Hash::HashFunc<K>> _Table;
	};
}